package indi.jp.project.validation.validator;

import indi.jp.project.validation.constraints.IsDouble;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * 实现
 *
 * @author jiangping
 * @date 2022/6/12
 */
public class IsDoubleValidator implements ConstraintValidator<IsDouble, Object> {

    public String message;

    @Override
    public void initialize(IsDouble isDouble) {
        this.message = isDouble.message();
    }

    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        System.out.println("######################");
        System.out.println(value);
        return false;
    }
}
